/* 
 * Gneat (http://gneat.org)
 *
 * (C) Copyright 2011 and beyond - Claudio Stella, all rights reserved.
 *
 * This file is part of Gneat.
 *
 * Gneat is free software: you can redistribute it and/or modify
 * it under the terms of the GNU Lesser General Public License (LGPL)
 * as published by the Free Software Foundation, either version 3 of the License, or
 * (at your option) any later version.
 *
 * Gneat is distributed in the hope that it will be useful,
 * but WITHOUT ANY WARRANTY; without even the implied warranty of
 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
 * GNU Lesser General Public License for more details.
 *
 * You should have received a copy of the GNU Lesser General Public License
 * and the GNU General Public License, for completeness, along with Gneat.  
 * If not, see <http://www.gnu.org/licenses/>.
 */
package org.neatshell.gneat.client.presenter.core.manipulation;

import org.neatshell.gneat.client.presenter.core.IPresenter;
import org.neatshell.gneat.client.presenter.core.IPresenterList;

public interface InsertionInside {
	/**
	 * Insert one or more presenters at the end of the current presenter's children list.
	 * @param presenters one or more presenters to insert.
	 * @return the current presenter
	 */
	IPresenter append(IPresenter... presenters);

	/**
	 * Insert the presenters contained in the passed list at the end of the current presenter's children list.
	 * @param list a list of presenters to insert.
	 * @return the current presenter
	 */
	IPresenter append(IPresenterList list);
	IPresenter append(String... html);

	/**
	 * Insert current presenter to the end of the target presenter's children list.
	 * @param target the presenter to which append the current one.
	 * @return the current presenter
	 */
	IPresenter appendTo(IPresenter target);

	String html();	
	IPresenter html(String html);

	/**
	 * Insert one or more presenters at the start of the current presenter's children list.
	 * @param presenters one or more presenters to insert.
	 * @return the current presenter
	 */
	IPresenter prepend(IPresenter... presenters);
	IPresenter prepend(String... html);

	/**
	 * Insert the presenters contained in the passed list at the start of the current presenter's children list.
	 * @param list a list of presenters to insert
	 * @return the current presenter
	 */
	IPresenter prepend(IPresenterList list);

	/**
	 * Insert current presenter to the start of the target presenter's children list.
	 * @param target the presenter to which prepend the current one
	 * @return the current presenter
	 */
	IPresenter prependTo(IPresenter target);

	/**
	 * Set the text contained by the current presenter.
	 * @param text a string of text to set as the content of this presenter
	 * @return the current presenter
	 */
	IPresenter text(String text);

	/**
	 * Get the text contained by the current presenter.
	 */
	String text();
}